<%@ page import="test.pojo.User" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: yaclt
  Date: 2021/12/7 0007
  Time: 9:00
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<div style="width:1000px;margin: 10% auto 0;">
    <table style="width: 500px;">
        <tr>
            <td>ID</td>
            <td>姓名</td>
            <td>年龄</td>
            <td>操作</td>
        </tr>
        <c:forEach var="u" items="${users}">
            <tr>
                <td>${u.id}</td>
                <td>${u.name}</td>
                <td>${u.age}</td>
                <td>
                    <a href="?id=${u.id}&act=edit">修改</a>
                    <a onclick="return confirm('确认是否删除？')" href="?id=${u.id}&act=del">删除</a>
                </td>
            </tr>
        </c:forEach>
    </table>
    <form action="?act=save" method="post">
        <input name="id" value="${user.id}">
        <input name="name" value="${user.name}">
        <input name="age" value="${user.age}">
        <button type="submit">修改</button>
    </form>
</div>
</body>
</html>
